翻訳と辞書
Words near each other
・ Multiple citizenship
・ Multiple cloning site
・ Multiple comparisons problem
・ Multiple complex developmental disorder
・ Multiple component pricing
・ Multiple Console Time Sharing System
・ Multiple correlation
・ Multiple correspondence analysis
・ Multiple cropping
・ Multiple cutaneous leiomyoma
・ Multiple deprivation index
・ Multiple description coding
・ Multiple disabilities
・ Multiple discovery
・ Multiple discriminant analysis
Multiple dispatch
・ Multiple displacement amplification
・ Multiple document interface
・ Multiple drafts model
・ Multiple drug resistance
・ Multiple edges
・ Multiple EM for Motif Elicitation
・ Multiple encryption
・ Multiple endocrine neoplasia
・ Multiple endocrine neoplasia type 1
・ Multiple endocrine neoplasia type 2
・ Multiple endocrine neoplasia type 2b
・ Multiple Epidermal Growth Factor-like Domains 8
・ Multiple epiphyseal dysplasia
・ Multiple Equivalent Simultaneous Offers


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Multiple dispatch : ウィキペディア英語版
Multiple dispatch

Multiple dispatch or multimethods is a feature of some programming languages in which a function or method can be dynamically dispatched based on the run-time (dynamic) type or, in the more general case some other attribute, of more than one of its arguments. This is a generalization of single-dispatch polymorphism where a function or method call is dynamically dispatched based on the actual derived type of the object on which the method has been called. Multiple dispatch routes the dynamic dispatch to the implementing function or method using the combined characteristics of one or more arguments.
==Understanding dispatch==
Developers of computer software typically organize source code into named blocks variously called subroutines, procedures, subprograms, functions, or methods. The code in the function is executed by ''calling'' it – executing a piece of code that references its ''name''. This transfers control temporarily to the called function; when the function's execution has completed, control is typically transferred back to the instruction in the ''caller'' that follows the reference.
Function names are usually selected so as to be descriptive of the function's purpose. It is sometimes desirable to give several functions the same name, often because they perform conceptually similar tasks, but operate on different types of input data. In such cases, the name reference at the function call site is not sufficient for identifying the block of code to be executed. Instead, the number and type of the arguments to the function call are also used to select among several function implementations.
In more conventional, i.e. single-dispatch object-oriented programming languages, when invoking a method (''sending a message'' in Smalltalk, ''calling a member function'' in C++), one of its arguments is treated specially and used to determine which of the (potentially many) methods of that name is to be applied. In many languages, the ''special'' argument is indicated syntactically; for example, a number of programming languages put the special argument before a dot in making a method call: special.method(other, arguments, here), so that lion.sound() would produce a roar, whereas sparrow.sound() would produce a cheep.
By contrast, in languages with multiple dispatch, the selected method is simply the one whose arguments match the number and type of the function call. There is no ''special'' argument that ''owns'' the function/method carried out in a particular call.
The Common Lisp Object System (CLOS) is an early and well-known example of multiple dispatch.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Multiple dispatch」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.